﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;


namespace Db8.Data
{
    [Table("Log")]
    public class Log
    {
        [Key]
        public int LogId {get; set; }

        [Required]
        public DateTime LogDt { get; set; }

        [ForeignKey("User")]
        public long? UserId { get; set; }
        public User User { get; set; }

        /// <summary>
        /// Should be: Information, Warning, or Error
        /// </summary>
        [Required]
        [StringLength(15)]
        public string Severity { get; set; }

        /// <summary>
        /// Should indicate the method where the exception occurred
        /// </summary>
        [Required]
        [StringLength(256)]
        public string Location { get; set; }

        /// <summary>
        /// Should indicate the primary error message
        /// </summary>
        [Required]
        [StringLength(256)]
        public string Message { get; set; }

        /// <summary>
        /// Any other details, including parameters, stack traces, etc
        /// </summary>
        [StringLength(4500)]
        public string Detail { get; set; }

    }
}
